<div class="smart-widget widget-dark-blue margin-md">
	<div class="smart-widget-header">产品信息</div>
	<div class="smart-widget-inner">
	<div class="smart-widget-body" >
		<form name="productForm" class="form-horizontal no-margin" id="type-constraint" data-validate="parsley" novalidate>
		    <div class="form-group">
                <label class="control-label col-lg-3"><span class="text_red">*</span>&nbsp;课程:</label>
                <div class="col-lg-9">
                  <ui-select ng-model="product.lessonInfo" theme="bootstrap">
                    <ui-select-match placeholder="可以输入课程名称来查找">{{$select.selected.name}}</ui-select-match>
                    <ui-select-choices repeat="item in lessons | filter: $select.search">
                      <div ng-bind-html="item.name | highlight: $select.search"></div>
                    </ui-select-choices>
                  </ui-select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-lg-3">发布:</label>
                <div class="col-lg-2">
                    <div class="custom-checkbox todo-checkbox">
                        <input id="selection" ng-model="product.enable" ng-checked="product.enable" type="checkbox">
                        <label for="selection" style="margin-top: 4px;"></label>
                    </div>
                </div>
                <label class="control-label col-lg-2">关键商品:</label>
                <div class="col-lg-2">
                    <div class="custom-checkbox todo-checkbox">
                        <input id="selection2" ng-model="product.key" ng-checked="product.key" type="checkbox">
                        <label for="selection2" style="margin-top: 4px;"></label>
                    </div>
                </div>
            </div>
            <div class="form-group"  ng-class="productForm.name.$invalid && productForm.name.$dirty ? 'has-error': ''">
                <label class="control-label col-lg-3"><span class="text_red">*</span>&nbsp;商品名称:</label>
                <div class="col-lg-6">
                    <input name="name" ng-model="product.name" type="text" class="form-control input-sm" placeholder="名称" required>
                    <label class="control-label" ng-show="productForm.name.$invalid && productForm.name.$dirty">名称不能为空</label>
                </div>
            </div>
            
			<div class="form-group"  ng-class="productForm.intro.$invalid && productForm.intro.$dirty ? 'has-error': ''">
				<label class="control-label col-lg-3"><span class="text_red">*</span>&nbsp;简介:</label>
				<div class="col-lg-6">
					<input name="intro" ng-model="product.intro" type="text" class="form-control input-sm" placeholder="简介" required>
					<label class="control-label" ng-show="productForm.intro.$invalid && productForm.intro.$dirty">简介不能为空</label>
				</div>
			</div>
			
			<div class="form-group">
                <label class="control-label col-lg-3"><span class="text_red">*</span>&nbsp;价格:</label>
                <div class="col-lg-2" ng-class="productForm.price.$invalid && productForm.price.$dirty ? 'has-error': ''">
                    <input name="price" ng-model="product.price" type="number" class="form-control input-sm" placeholder="价格" required>
                    <label class="control-label" ng-show="productForm.price.$invalid && productForm.price.$dirty">价格不能为空</label>
                </div>
                <label class="control-label col-lg-2"><span class="text_red">*</span>&nbsp;价格描述:</label>
                <div class="col-lg-3" ng-class="productForm.priceDesc.$invalid && productForm.priceDesc.$dirty ? 'has-error': ''">
                    <input name="priceDesc" ng-model="product.priceDesc" type="text" class="form-control input-sm" placeholder="价格描述" required>
                    <label class="control-label" ng-show="productForm.priceDesc.$invalid && productForm.priceDesc.$dirty">价格描述不能为空</label>
                </div>
            </div>
			
			<div class="form-group">
                <label class="control-label col-lg-3">成交量:</label>
                <div class="col-lg-2">
                    <input name="saleCount" ng-model="product.saleCount" type="number" class="form-control input-sm" placeholder="成交量" required readonly="readonly">
                    <label class="control-label" ng-show="productForm.saleCount.$invalid && productForm.saleCount.$dirty">成交量不能为空</label>
                </div>
                <label class="control-label col-lg-2">成交量加成:</label>
                <div class="col-lg-2" ng-class="productForm.saleCountPlus.$invalid && productForm.saleCountPlus.$dirty ? 'has-error': ''">
                    <input name="saleCountPlus" ng-model="product.saleCountPlus" type="number" class="form-control input-sm" placeholder="成交量加成" required>
                    <label class="control-label" ng-show="productForm.saleCountPlus.$invalid && productForm.saleCountPlus.$dirty">成交量加成不能为空</label>
                </div>
            </div>
			
			<div class="form-group"  ng-class="productForm.desc.$invalid && productForm.desc.$dirty ? 'has-error': ''">
                <label class="control-label col-lg-3"><span class="text_red">*</span>课程描述:</label>
                <div class="col-lg-9">
                    <textarea name="desc" ui-tinymce="tinymceOptions" ng-model="product.desc" rows="10" cols="70" required></textarea>
                    <label class="control-label" ng-show="productForm.desc.$invalid && productForm.desc.$dirty">课程描述不能为空</label>
                </div>
            </div>
			<div class="text-right m-top-md">
				<button ng-click="save(product)" class="btn btn-success btn-sm" ng-disabled="productForm.$invalid"><i class="fa fa-save m-right-xs"></i>保存</button>
			</div>
		</form>
	</div>
	</div>
</div>